package org.example.mulitithreading.ex1;

import java.util.concurrent.TimeUnit;

public class MyThread1 extends Thread {
    @Override
    public void run() {
        while (true){
            if(Money.money != 100000) {
                System.out.println("钱已经不是十万了");
                break;
            }
            try {
                TimeUnit.MILLISECONDS.sleep(100);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
